<?php
declare (strict_types = 1);

namespace app\api\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class GroupMaster extends Model
{
    static public function findIndex($id){
        return self::where('id',$id)->select();
    }

    /**
     * @param $data
     * @return mixed
     * 用户申请团长
     */
    public function addGroupMaster($data)
    {
        //添加数据
        $group_master = self::create($data);
        //获取自增id
        $master_id = $group_master->id;
        return $master_id;
    }
}
